package com.example.quartz.config;

import com.example.douyin.controller.AuthorizationController;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.converter.StringHttpMessageConverter;
import org.springframework.web.client.RestTemplate;

import java.nio.charset.Charset;

/**
 * @author dangwen1
 * @date 2022年01月20日 11:42
 * @description
 */
@Configuration
public class BeanConfig {
    @Bean
    public AuthorizationController authorizationController(){
        return new AuthorizationController();
    }

    @Bean
    public RestTemplate restTemplate() {
        RestTemplate restTemplate = new RestTemplate();
        restTemplate.getMessageConverters().add(new StringHttpMessageConverter(Charset.forName("utf-8")));
        return restTemplate;
    }
}
